//
//  BaseModule.m
//  CocoapodsOC
//
//  Created by 刘培壮 on 2018/10/16.
//  Copyright © 2018 com.blue. All rights reserved.
//

#import "BaseModule.h"
#import "ViewController.h"
#import "SecondViewController.h"

@interface BaseModule ()

- (id <AnimalProtocol>)myAnimal;

@end

@implementation BaseModule

//- (ViewController *)viewController {
//    NSLog(@"%s",__func__);
//    return [TyphoonDefinition withClass:[ViewController class] configuration:^(TyphoonDefinition *definition) {
//        [definition injectProperty:@selector(animal) with:self.myAnimal];
//    }];
//}

- (id)secondViewController {
    NSLog(@"%s",__func__);
    return [TyphoonDefinition withClass:[SecondViewController class] configuration:^(TyphoonDefinition *definition) {
        [definition injectProperty:@selector(animal) with:self.myAnimal];
    }];
}

- (id<AnimalProtocol>)myAnimal {
    NSLog(@"%s",__func__);
    return [TyphoonDefinition withClass:[Dog class]];
}
@end
